package com.project.myxima.utils;

import android.util.Log;

public class LogUtils {

    public static String sTAG = "LogUtils";
    //是否要输出日志
    public static boolean sIsRelease = false;//为true时不输出日志

    public static void init(String baseTag,boolean isRelease){
        sTAG = baseTag;
        sIsRelease = isRelease;
    }
    //debug
    public static void d(String TAG,String content){
        if(!sIsRelease){
            Log.d("[" + TAG + "]",content);
        }
    }

    //verbose
    public static void v(String TAG, String content) {
        if (!sIsRelease) {
            Log.d("[" + sTAG + "]" + TAG, content);
        }
    }

    //Info
    public static void i(String TAG, String content) {
        if (!sIsRelease) {
            Log.d("[" + sTAG + "]" + TAG, content);
        }
    }

    //Warn
    public static void w(String TAG, String content) {
        if (!sIsRelease) {
            Log.d("[" + sTAG + "]" + TAG, content);
        }
    }

    //Error
    public static void e(String TAG, String content) {
        if (!sIsRelease) {
            Log.d("[" + sTAG + "]" + TAG, content);
        }
    }

}
